
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
     <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
      <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
</head>

<body style="color:#333;padding:3px;">
     <!-- 标题 -->
    <div class="page-heade">
      <h1 class="title_color">导入补货成本数据</h1>
    </div>
    <!-- 标题 -->
    <form action="{:url('upload')}"  enctype="multipart/form-data"  method="post" class="form-inline">
    <table class="table table-bordered" style="margin: 0">
      <tr>
        <td>
        一级考核期：
        <select name="" id="year" class="form-control">
          <option value="">请选择</option>
            {volist name="years" id="row"}
          <option value="{$row}" {if $row==date('Y')}selected{/if}>{$row}</option>
            {/volist}
        </select>
        <select name="khq" id="khq" class="form-control">
            <option value="">请选择</option>
            {volist name="khq1" id="row"}
            <option value="{$row.id}">{$row.title}</option>
            {/volist}
        </select>
        </td>
      </tr>
      <tr>
        <td>选择导入文件：<input type="file" name="file" id="exampleInputFile" style="display: inline-block;"> <span class="lr_5"></span><button class="btn-info btn" type="submit">导入</button></td>
      </tr>
      <tr>
        <td>
          <p class="colorRed">温馨提示：如果导入过程中出现未满足指掌天下系统要求数据，则整份导入资料都将无法导入，必须按照指掌天下系统给出的信息提示修改导入资料后再重新导入。</p>
          <p class="padding-10"><span class="font-bold">Excel文件导入格式：</span><a href="__ROOT__/uploads/BUHUOCHENGBEN.xlsx">补货成本格式.xls</a><span class="colorRed">注：Excel中标记为红色底色的列为必填项。每次导入都会累加原有数据。</span></p>
        </td>
      </tr>
    </table>
    </form>
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    </body>
<script>
    $('#year').on('change',function () {
        var year = $(this).val()
        $.post('{:url("getkhq")}',{year:year},function (data) {
            var str = '',i=0
            for(var i in data){
                str += '<option value="'+data[i].id+'">'+data[i].title+'</option>'
            }
            $('#khq').html('<option>请选择</option>'+str)
        },'json')
    })
</script>
</html>